package com.woniu.bh.filter;

import org.springframework.cloud.gateway.filter.GatewayFilterChain;
import org.springframework.cloud.gateway.filter.GlobalFilter;
import org.springframework.core.Ordered;
import org.springframework.stereotype.Component;
import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Mono;

/**
 * @version: V1.0
 * @author: Xbao
 * @className: AuthenFilter
 * @packageName: com.woniu.bh.filter
 * @description:
 * @data: 2020-10-14 14:55
 */
@Component
public class AuthenFilter implements GlobalFilter, Ordered {

    @Override
    public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
        System.out.println("2认证处理");
        return chain.filter(exchange);
    }

    @Override
    public int getOrder() {
        return 2;
    }
}
